#include "LinearMath/btStackAlloc.h"
#ifdef __cplusplus
extern "C" {
#endif
btStackAlloc* bullet_NewbtStackAlloc(unsigned int size){
	unsigned int c_arg_size=size;
	btStackAlloc* wrap_out = new btStackAlloc(c_arg_size);
	return wrap_out;
}

unsigned char* bullet_btStackAlloc_allocate(btStackAlloc* c_this,unsigned int size){
	unsigned int c_arg_size=size;
	unsigned char * c_out = c_this->allocate(c_arg_size);
	unsigned char* wrap_out = (unsigned char*)(void*)(c_out);
	return wrap_out;
}

void bullet_btStackAlloc_create(btStackAlloc* c_this,unsigned int size){
	unsigned int c_arg_size=size;
	c_this->create(c_arg_size);
}

void bullet_btStackAlloc_destroy(btStackAlloc* c_this){
	c_this->destroy();
}

void bullet_btStackAlloc_endBlock(btStackAlloc* c_this,btBlock* block){
	btBlock * c_arg_block=(btBlock *)(void*)(block);
	c_this->endBlock(c_arg_block);
}

int bullet_btStackAlloc_getAvailableMemory(btStackAlloc* c_this){
	int c_out = c_this->getAvailableMemory();
	int wrap_out = (c_out);
	return wrap_out;
}

btBlock* bullet_NewbtBlock(){
	btBlock* wrap_out = new btBlock();
	return wrap_out;
}

unsigned char** bullet_btBlock_GetFieldOfAddress(btBlock* c_this){
	return (unsigned char**)(&c_this->address);
}

btBlock** bullet_btBlock_GetFieldOfPrevious(btBlock* c_this){
	return (btBlock**)(&c_this->previous);
}

#ifdef __cplusplus
}
#endif
